import Vue from "vue";
import App from "./App.vue";
import router from "./router";
import store from "./store";
import "./plugins/element.js";
//全局css
import "./assets/css/global.css";
//iconfont
import "./assets/font/iconfont.css";
//导入nprogress
import NProgress from 'nprogress'


//axios
import axios from "axios";
//配置根路径
axios.defaults.baseURL = 'http://www.52xhl.top:8889/api/private/v1/'
//挂载token
axios.interceptors.request.use(config => {
    NProgress.start();
    // 在发送请求之前做些什么
    config.headers.Authorization = window.sessionStorage.getItem('token');
    return config;
})
axios.interceptors.response.use(config => {
    NProgress.done();
    return config
})
//吧axios挂载打vue的原型对象上
Vue.prototype.$http = axios

//vue-table
import ZkTable from 'vue-table-with-tree-grid'
Vue.component('tree-table', ZkTable)

//富文本
import VueQuillEditor from 'vue-quill-editor'



Vue.use(VueQuillEditor)


Vue.config.productionTip = false

new Vue({
    router,
    store,
    render: (h) => h(App),
}).$mount("#app");